package com.jtzc.aikf.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jtzc.aikf.entity.Appointment;
import com.jtzc.aikf.service.AppointmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wu chuang
 * @description
 */
@RestController
public class AppointmentController {

    @Autowired
    private AppointmentService appointmentService;

    @GetMapping("list")
    public Page<Appointment> list(){
        Page<Appointment> objectPage = new Page<>();
        objectPage.setCurrent(1);
        objectPage.setSize(10);
        Page<Appointment> page = appointmentService.page(objectPage);
        return page;
    }
}
